package com.richpencil.utils;

import javax.servlet.http.HttpServletRequest;

public class RequestHelper {
	
	public static String getServerUrl(HttpServletRequest request)
	{
		HttpServletRequest httpRequest=(HttpServletRequest)request;
		String strBackUrl = "http://" + httpRequest.getServerName() + ":"
		+ httpRequest.getServerPort()
		+ httpRequest.getContextPath();
		return strBackUrl;
	}
	public static String getServerUrlRelative(HttpServletRequest request){
		String path=request.getSession().getServletContext().getRealPath("/");
		return path;
	}
}
